# !/usr/bin python3
# encoding: utf-8 -*-
# @file     : order_actions.py
# @author   : 沙陌 Matongxue_2
# @Time     : 2023/9/9 15:03
# @Copyright: 北京码同学
from pages.seller.home_page import SellerHomePage


class SellerOrderActions:

    def order_delivery(self, order_sn, express_num):
        SellerHomePage() \
            .click_order_manager() \
            .click_order_list() \
            .send_keys_search_text(order_sn) \
            .click_search_btn() \
            .click_view_detail() \
            .send_keys_express_num(express_num) \
            .click_fahuo_btn() \
            .click_confirm_btn()

    # SellerMenuPage().click_order_manager().click_order_list().send_key_search_text(ord_no).click_search_btn()
    # .click_detail_btn().send_key_delivery_no(delivery_no).click_delivery_btn().click_confirm_btn()

    # order_list return SellerOrderListPage()       detail_btn return SellerDeliveryDetailPage()

    def order_pay(self, order_sn):
        SellerHomePage() \
            .click_order_manager() \
            .click_order_list() \
            .send_keys_search_text(order_sn) \
            .click_search_btn() \
            .click_view_detail().click_confirm_pay().click_confirm_btn()
